<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .background {
            width: 200px;
            background-image: url('./背影.jpg');
            background-size: 100%;
            /* position: relative; */
        }

        .foreground {
            width: 200px;
            height: 200px;
            /* position: absolute; */
            /* top: 0; */
            /* left: 0; */
            /* padding: 10px; */
            background-color: green;
            color: white;
            mix-blend-mode: multiply;
            /* 这里可以使用不同的模式，如 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity' 等 */
        }
    </style>
</head>

<body>

    <div class="background">
        <div class="foreground">我是前景文本</div>
    </div>
</body>

</html>